package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.po.Dictionary;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "ribbon-consumer", fallback = DictionaryServiceFallback.class)
public interface DictionaryService {

    @RequestMapping(value = "/dictionary/query", method = RequestMethod.GET)
    Result<List<Dictionary>> query(@RequestParam("keyNo") String keyNo);

    @RequestMapping(value = "/dictionary", method = RequestMethod.GET)
    Result list();
}
